package com.igeek.boot_4_druid.service;

import com.igeek.boot_4_druid.entity.User;
import com.igeek.boot_4_druid.mapper.UserMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author: zhiyu
 * @Date:19:54
 * @DESC:
 */
@Service
public class UserService {
    @Autowired
    UserMapper userMapper;
    public boolean deleteByPrimaryKey(Integer id){
        return userMapper.deleteByPrimaryKey(id);
    };
    public boolean insert(User user){
        return userMapper.insert(user);
    };
    public List<User> selectAll(String name){
        return userMapper.selectAll(name);
    };
    public boolean updateByPrimaryKey(User user){
        return userMapper.updateByPrimaryKey(user);
    };

}
